<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>facerecognition.sql.SQL</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Facerecognition</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;facerecognition ::
        <a href="facerecognition.sql-module.html">Module&nbsp;sql</a> ::
        Class&nbsp;SQL
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="facerecognition.sql.SQL-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SQL</h1><p class="nomargin-top"></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">SQL</strong>
</pre>

<hr />
<p>Contains functions to create, update, select or check things through 
  the database.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Initialization of SQL.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#get_closest_shape_diffs" class="summary-sig-name">get_closest_shape_diffs</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">shape_diff</span>,
        <span class="summary-sig-arg">face_ids</span>)</span><br />
      Returns the user_ids of the users that have the closest shape_diff compared to the incoming shape_diff
and where the face_id(s) are equal to the incoming once.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#get_closest_temp_diffs" class="summary-sig-name">get_closest_temp_diffs</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">temp_diff</span>,
        <span class="summary-sig-arg">face_ids</span>)</span><br />
      Returns the user_ids of the users that have the closest temp_diff compared to the incoming temp_diff
and where the face_id(s) are equal to the incoming once.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#get_oldest_face_id" class="summary-sig-name">get_oldest_face_id</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">user_id</span>)</span><br />
      Returns the oldest face_id of an user.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#get_most_recent_faces" class="summary-sig-name">get_most_recent_faces</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">user_id</span>)</span><br />
      Returns the three most recent face_ids of an user.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#get_pic_name" class="summary-sig-name">get_pic_name</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">face_id</span>)</span><br />
      Returns the picture name of the given face_id.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#get_user" class="summary-sig-name">get_user</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">user_id</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">login_name</span>=<span class="summary-sig-default">None</span>)</span><br />
      Returns the user's user_id, title, first name and last name.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#get_user_face" class="summary-sig-name">get_user_face</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">pic_name</span>)</span><br />
      Returns the face_id of a pic_name.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_all_users"></a><span class="summary-sig-name">get_all_users</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns the title and name of all users.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#get_user_list" class="summary-sig-name">get_user_list</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns all users excluding the test_users.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_last_inserted_user_id"></a><span class="summary-sig-name">get_last_inserted_user_id</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns the user_id of the last inserted user.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_max_user_id"></a><span class="summary-sig-name">get_max_user_id</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns the highest user_id.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#user_exists" class="summary-sig-name">user_exists</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">user_id</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">login_name</span>=<span class="summary-sig-default">None</span>)</span><br />
      Checks if the given user_id OR login_name exists.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#user_face_exists" class="summary-sig-name">user_face_exists</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">pic_name</span>)</span><br />
      Checks if the given pic_name exists.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#count_users_faces" class="summary-sig-name">count_users_faces</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">user_id</span>)</span><br />
      Return the amount of users_faces.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#update_user_face" class="summary-sig-name">update_user_face</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">shape_diff</span>,
        <span class="summary-sig-arg">temp_diff</span>,
        <span class="summary-sig-arg">pic_name</span>,
        <span class="summary-sig-arg">face_id</span>)</span><br />
      Updates an user_face record.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#create_user_face" class="summary-sig-name">create_user_face</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">shape_diff</span>,
        <span class="summary-sig-arg">temp_diff</span>,
        <span class="summary-sig-arg">pic_name</span>,
        <span class="summary-sig-arg">user_id</span>)</span><br />
      Creates an user_face record.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#create_user" class="summary-sig-name">create_user</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span><br />
      Creates an user.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.sql.SQL-class.html#connect_db" class="summary-sig-name">connect_db</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Creates a connection with the database.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="close_db"></a><span class="summary-sig-name">close_db</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Closes the connection with the database.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Initialization of SQL.</p>
  <dl class="fields">
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="get_closest_shape_diffs"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_closest_shape_diffs</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">shape_diff</span>,
        <span class="sig-arg">face_ids</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Returns the user_ids of the users that have the closest shape_diff compared to the incoming shape_diff
and where the face_id(s) are equal to the incoming once.
Parameters: float shape_diff - return value of faceDetect.matchShapes()
            list face_ids - list of face_id's of users_faces.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="get_closest_temp_diffs"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_closest_temp_diffs</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">temp_diff</span>,
        <span class="sig-arg">face_ids</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Returns the user_ids of the users that have the closest temp_diff compared to the incoming temp_diff
and where the face_id(s) are equal to the incoming once.
Parameters: float shape_diff - return value of faceDetect.matchTemplate()
            list face_ids - list of face_id's of users_faces.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="get_oldest_face_id"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_oldest_face_id</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">user_id</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Returns the oldest face_id of an user. Parameters: int user_id - user 
  identification code</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="get_most_recent_faces"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_most_recent_faces</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">user_id</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Returns the three most recent face_ids of an user. Parameters: int 
  user_id - user identification code</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="get_pic_name"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_pic_name</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">face_id</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Returns the picture name of the given face_id. Parameters: int face_id
  - user_face identication code</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="get_user"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_user</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">user_id</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">login_name</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Returns the user's user_id, title, first name and last name. Searches by user_id.
Parameters: int user_id - user identification code
            string login_name - login name of an user
Either of one should always be None.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="get_user_face"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_user_face</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">pic_name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Returns the face_id of a pic_name. Parameters: string pic_name - 
  picture name Only used in conf.py</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="get_user_list"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_user_list</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Returns all users excluding the test_users. Only created for prototype
  to avoid showing all the test users.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="user_exists"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">user_exists</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">user_id</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">login_name</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Checks if the given user_id OR login_name exists.
Parameters: int user_id - user identification code
            string login_name - login name of an user
Either of one should always be None.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="user_face_exists"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">user_face_exists</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">pic_name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Checks if the given pic_name exists. Parameters: string pic_name - 
  picture name Only used in conf.py</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="count_users_faces"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">count_users_faces</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">user_id</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Return the amount of users_faces. Parameters: int user_id - user 
  identification code</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="update_user_face"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">update_user_face</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">shape_diff</span>,
        <span class="sig-arg">temp_diff</span>,
        <span class="sig-arg">pic_name</span>,
        <span class="sig-arg">face_id</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Updates an user_face record.
Parameters: float shape_diff - return value of faceDetect.matchShapes()
            float temp_diff - return value of faceDetect.matchTemplate()
            string pic_name - picture name
            int face_id - user_face identication code

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="create_user_face"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_user_face</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">shape_diff</span>,
        <span class="sig-arg">temp_diff</span>,
        <span class="sig-arg">pic_name</span>,
        <span class="sig-arg">user_id</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Creates an user_face record.
Parameters: float shape_diff - return value of faceDetect.matchShapes()
            float temp_diff - return value of faceDetect.matchTemplate()
            string pic_name - picture name
            int user_Id - user identication code

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="create_user"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_user</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Creates an user. Parameters: string name - name of the user (format: 
  'Piet' or 'Piet Hein')</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="connect_db"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">connect_db</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Creates a connection with the database. For the database configuration
  see conf.py.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Facerecognition</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Tue Jul  5 14:23:35 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
